import {createStore} from "vuex";

const store = createStore({
    actions:{
    },
    mutations: {
        changeMode(state,value){
            state.PracticeOrExam = value
        },
        changeflag(state) {
            state.flag = !state.flag
        }
    },
    state:{
        PracticeOrExam: true, //练习模式与考试模式标志，true为练习模式，false为考试模式
        flag: false, //菜单栏左右滑动标志
        menu: [
            {
                index: '1',
                title: '考试管理',
                icon: 'Document',
                content: [
                    {item:'功能介绍',path:'/examDescription'},
                    {item:'考试查询',path:'/selectExam'},
                    {item:'添加考试',path:'/addExam'}
                ]
            },
            {
                index: '2',
                title: '题库管理',
                icon: 'Tickets',
                content: [
                    {item:'功能介绍',path:'/paperDescription'},
                    {item:'题库查询',path:'/selectPaper'},
                    {item:'试题查询',path:'/selectAnswer'},
                    {item:'题库添加',path:'/add'},
                ],
            },
            {
                index: '3',
                title: '成绩管理',
                icon: 'Histogram',
                content: [
                    {item:'学生成绩查询',path:'/studentsGrade'},
                    {item: '成绩分段查询',path: '/selectExamPart'},
                ],
            },
            {
                index: '4',
                title: '学生管理',
                icon: 'UserFilled',
                content: [
                    {item:'学生信息管理',path:'/studentManage'},
                    {item: '添加学生',path: '/addStudent'}
                ],
            },
        ]
    }
})
export default store